import request from '@/utils/request'

const api = {
  getBarcodeXcPageUrl: '/barcode_xc/get_barcode_xc_page',
  getBarcodeRelatedXcUrl: '/barcode_xc/get_barcode_related_xc',
  barcodeUnboxUrl: '/barcode_xc/barcode_unbox',
  getUnboxBarcodeUrl: '/barcode_xc/get_unbox_barcode',
  barcodePackingUrl: '/barcode_xc/barcode_packing',
}

export async function barcodePackingApi(params: Map<string, any>) {
  const res = await request({
    url: api.barcodePackingUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function getUnboxBarcodeApi(params: Map<string, any>) {
  const res = await request({
    url: api.getUnboxBarcodeUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function barcodeUnboxApi(params: Map<string, any>) {
  const res = await request({
    url: api.barcodeUnboxUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function getBarcodeRelatedXcApi(params: Map<string, any>) {
  const res = await request({
    url: api.getBarcodeRelatedXcUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function getBarcodeXcPageApi(params: Map<string, any>) {
  const res = await request({
    url: api.getBarcodeXcPageUrl,
    method: 'post',
    data: params,
  })
  return res
}
